nonlin_single_var Module



Interfaces

interface

  • public function fcn1var(x, args) result(f)

    Describes a function of one variable.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: x

    The independent variable.

    class(*), intent(inout), optional :: args

    An optional argument to allow the user to communicate with the routine.

    Return Value real(kind=real64)

    The value of the function at x.

interface

  • public subroutine nonlin_solver_1var(this, fcn, x, lim, f, ib, args)

    Describes the interface of a solver for an equation of one variable.

    Arguments

    Type IntentOptional Attributes Name
    class(equation_solver_1var), intent(inout) :: this

    The equation_solver_1var object.

    class(fcn1var_helper), intent(in) :: fcn

    The fcn1var_helper object containing the equation to solve.

    real(kind=real64), intent(inout) :: x

    On input the initial guess at the solution. On output the solution.

    type(value_pair), intent(in) :: lim

    A value_pair object defining the search limits.

    real(kind=real64), intent(out), optional :: f

    An optional parameter used to return the function residual as computed at x.

    type(iteration_behavior), optional :: ib

    An optional output, that if provided, allows the caller to obtain iteration performance information.

    class(*), intent(inout), optional :: args

    An optional argument to allow the user to communicate with the routine.


Derived Types

type, public, abstract ::  equation_solver_1var

A base class for various solvers of equations of one variable.

Type-Bound Procedures

procedure, public :: get_diff_tolerance => es1_get_diff_tol
procedure, public :: get_fcn_tolerance => es1_get_fcn_tol
procedure, public :: get_max_fcn_evals => es1_get_max_eval
procedure, public :: get_print_status => es1_get_print_status
procedure, public :: get_var_tolerance => es1_get_var_tol
procedure, public :: set_diff_tolerance => es1_set_diff_tol
procedure, public :: set_fcn_tolerance => es1_set_fcn_tol
procedure, public :: set_max_fcn_evals => es1_set_max_eval
procedure, public :: set_print_status => es1_set_print_status
procedure, public :: set_var_tolerance => es1_set_var_tol
procedure(nonlin_solver_1var), public, deferred, pass :: solve

type, public ::  fcn1var_helper

Defines a type capable of encapsulating an equation of one variable of the form: f(x) = 0.

Type-Bound Procedures

procedure, public :: diff => f1h_diff_fcn
procedure, public :: fcn => f1h_fcn
procedure, public :: is_derivative_defined => f1h_is_diff_defined
procedure, public :: is_fcn_defined => f1h_is_fcn_defined
procedure, public :: set_diff => f1h_set_diff
procedure, public :: set_fcn => f1h_set_fcn